package day3.Exer;

import java.util.Scanner;

public class Companytest {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        Company a = new Company();
        while (true) {
            System.out.println("1.员工入职；2.显示员工信息；3.辞退员工；0.退出");
            System.out.println("请选择：");
            int chosen = in.nextInt();
            switch (chosen) {
                case 1: {
                    System.out.println("请输入新员工姓名");
                    String stname = in.next();
                    a.add(stname);
                    break;
                }
                case 2: {
                    a.showstaff();
                    break;
                }
                case 3: {
                    System.out.println("请输入辞退员工姓名：");
                    String disname = in.next();
                    a.dismiss(disname);
                    break;
                }
                case 0: {
                    System.out.println("结束!感谢使用！");
                    return;
                }
            }


        }
    }
}
